1. Technical Field
The present invention relates to a magnetic sensor device for converting a magnetic field intensity into an electric signal, and more particularly to a magnetic sensor device to be employed as a sensor for detecting an open/close state used in a flip phone, a notebook computer, or the like, or a sensor for detecting a rotational position of a motor.
2. Background Art
A magnetic sensor device has been employed as a sensor for detecting the open/close state used in a flip phone, a notebook computer, or the like, or a sensor for detecting a rotational position of a motor (for example, refer to Japanese Patent Application Laid-open No. 2001-337147). A circuit diagram of the magnetic sensor device is illustrated in FIG. 5.
In the magnetic sensor device, a magnetoelectric conversion element (for example, Hall element) outputs a voltage proportional to a magnetic field intensity or a magnetic flux density, an amplifier amplifies the output voltage, a comparator determines the voltage, and outputs a binary signal of an H signal or an L signal. The output voltage of the magnetoelectric conversion element is minute, and hence, easily affected by an offset voltage (element offset voltage) of the magnetoelectric conversion element, an offset voltage (input offset voltage) of the amplifier or the comparator, or noise within the conversion device, which leads to a problem. The element offset voltage is mainly generated by a stress or the like exerted on the magnetoelectric conversion element by a package. The input offset voltage is mainly generated by a characteristic variation of an element that forms an input circuit of the amplifier. The noise is mainly generated by a flicker noise of a monolithic transistor that forms a circuit, or a thermal noise of the monolithic transistor or a resistive element.
In order to reduce an influence of the above-mentioned offset voltage of the magnetoelectric conversion element or the amplifier, the magnetic sensor device illustrated in FIG. 5 is configured as follows. The magnetic sensor device illustrated in FIG. 5 is configured to include a Hall element 1, a switching circuit 2 that switches between a first detection state and a second detection state of the Hall element 1, a differential amplifier 3 that amplifies a voltage difference (V1−V2) of two output terminals of the switching circuit 2, a capacitor C1 having one end connected to one output terminal of the differential amplifier 3, a switch S1 connected between another output terminal of the differential amplifier 3 and another end of the capacitor C1, a comparator 4, and a D-type flip-flop D1. In the first detection state, a supply voltage is input from terminals A and C, and a detection voltage is output from terminals B and D. In the second detection state, the supply voltage is input from the terminals B and D, and the detection voltage is output from the terminals A and C.
It is assumed that a differential output voltage of the magnetoelectric conversion element is Vh, a gain of the differential amplifier is G, and the input offset voltage of the differential amplifier is Voa. In the first detection state, the switch S1 is turned on, and the capacitor C1 is charged with Vc1=V3−V4=G(Vh1+Voa). Then, in the second detection state, the switch S1 is turned off, and Vc2=V3−V4=G(−Vh2+Voa) is output. Here, V5−V6=V3−Vc1−V4=Vc2−Vc1=−G(Vh1+Vh2) is satisfied, to thereby offset the influence of the input offset voltage. Further, the detection voltages Vh1 and Vh2 of the magnetoelectric conversion element generally have an in-phase valid signal component and a reverse-phase element offset component, and hence the influence of the element offset component is also removed from the above-mentioned output voltage. An applied magnetic field and a reference voltage are compared with each other by the comparator and an output result obtained by the comparison is latched. In the case illustrated in FIG. 5, the reference voltage is an in-phase voltage in the magnetoelectric conversion element, which may be arbitrarily set by an additional circuit.